var that;
var rightAmt = wx.createAnimation({
  duration: 500,
  timingFunction: 'ease-out'
});
var offsethgt = wx.getSystemInfoSync().windowHeight;
function init(target) {
  that = target;
  that.setData({
    rightwin: false
  });
}

function show() {
  that.setData({
    righttop: -offsethgt,
    rightwin: true
  });
  rightAmt.top(0).step();
  that.setData({
    rightAmt: rightAmt.export()
  });
}

function close() {
  that.setData({
    rightwin: false
  });
}

module.exports = {
  init: init,
  close: close,
  show: show
}